/**
 * 请求拦截，设置token到请求头
 */
layui.use(['jquery'],function() {
    window.jQuery = window.$ = layui.jquery;
    if(!sessionStorage.getItem(config.tokenKey)) {
        location.href = 'login.html'
    } else {
        $.ajaxSetup({
            headers:{'Authorization':  'Bearer ' + sessionStorage.getItem(config.tokenKey)}
        });
    }
});

